c7a6c71300d3278cce7b8c94d4266e954d8c1f05,core/src/main/java/net/peakgames/libgdx/stagebuilder/core/builder/TextFieldBuilder.java,TextFieldBuilder,build,#BaseModel#,26
Before Change
NinePatchDrawable background = null;
if(textFieldModel.getBackgroundImageName() != null){
background = createNinePatchDrawable(textFieldModel.getBackgroundImageName(), textureAtlas, textFieldModel.getBackGroundOffset());
background.setLeftWidth(textFieldModel.getPadding());
background.setRightWidth(textFieldModel.getPadding());
background.setBottomHeight(textFieldModel.getPadding());
After Change
BitmapFont font = assets.getFont(textFieldModel.getFontName());
Color fontColor = Color.valueOf(textFieldModel.getFontColor());
TextureAtlas textureAtlas = assets.getTextureAtlas(textFieldModel.getAtlasName());
NinePatchDrawable cursor = convertTextureRegionToNinePatchDrawable(
textureAtlas.findRegion(textFieldModel.getCursorImageName()),
textFieldModel.getCursorOffset(),
textFieldModel.getCursorOffset(),
textFieldModel.getCursorOffset(),
textFieldModel.getCursorOffset());
cursor.getPatch().setColor(fontColor);
NinePatchDrawable selection = convertTextureRegionToNinePatchDrawable(
textureAtlas.findRegion(textFieldModel.getSelectionImageName()),
textFieldModel.getSelectionOffset(),
textFieldModel.getSelectionOffset(),
textFieldModel.getSelectionOffset(),
textFieldModel.getSelectionOffset());
NinePatchDrawable background = null;
if(textFieldModel.getBackgroundImageName() != null) {
if (textFieldModel.isBackgroundUsingPatchSize()) {
background = convertTextureRegionToNinePatchDrawable(
textureAtlas.findRegion(textFieldModel.getBackgroundImageName()),
textFieldModel.getBackgroundPatchSizeLeft(),
textFieldModel.getBackgroundPatchSizeRight(),
textFieldModel.getBackgroundPatchSizeTop(),
textFieldModel.getBackgroundPatchSizeBottom());
} else {
background = convertTextureRegionToNinePatchDrawable(
textureAtlas.findRegion(textFieldModel.getBackgroundImageName()),